using System;

namespace PropertyExpression.ControllableQuery.Toolkit
{
    public delegate object QueryCreator(QueryCreatorContext queryCreatorContext);

    public class QueryCreatorContext
    {
        private readonly Func<Type, object> createParamFunc;
        private readonly QueryContext queryContext;

        internal QueryCreatorContext(Func<Type, object> createParamFunc, QueryContext queryContext)
        {
            this.createParamFunc = createParamFunc;
            this.queryContext = queryContext;
        }

        public QueryContext QueryContext
        {
            get { return queryContext; }
        }

        internal Func<Type, object> CreateParamFunc
        {
            get { return createParamFunc; }
        }
    }
}